package com.example.auth.clients;

import com.alibaba.fastjson.JSONArray;
import com.example.auth.model.Result;
import org.springframework.cloud.netflix.feign.FeignClient;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.RequestParam;

/**
 * Created by wangtao on 2018/3/13.
 */
@FeignClient(name = "user-center")
public interface UserFeignClient {

    @RequestMapping(value = "/checkLogin",method = RequestMethod.POST)
    public Result checkLogin(@RequestParam("username") String username,@RequestParam("password") String password);

    @RequestMapping(value = "/menus",method = RequestMethod.GET)
    public JSONArray menus(@RequestParam("userId") Long userId);

    @RequestMapping(value = "/allButtons",method = RequestMethod.GET)
    public Result allButtons(@RequestParam("userId") Long userId);

    @RequestMapping(value = "/patient/findByMedicalNumber", method = RequestMethod.GET)
    public Result findByMedicalNumber(@RequestParam("medicalNumber") String medicalNumber);

}
